<template>
	<view class="flex-col-xc">
		<view class="title-bg flex-row-yc">
			<view @click="back" class="item-icon"><u-icon name="arrow-left" color="#fff"></u-icon></view>
			<view class="flex1 text">设置</view>
		</view>

		<view class="flex-row-yc item" style="display: none;">
			<view class="flex1">
				修改密码
			</view>
			<view @click="goChangePasswordPage" class="item-icon"><u-icon name="arrow-right" color="#76a2d3"></u-icon>
			</view>
		</view>

		<view class="flex-row-yc item" style="display: none;">
			<view class="flex1">检查版本</view>
			<view>27.0.0</view>
		</view>
		
		<view class="login-out" @click="loginOut">注销登录</view>
	</view>
</template>

<script>
	import {
		logout
	} from '@/api/login'
	export default {
		data() {
			return {

			}
		},
		methods: {
			goChangePasswordPage() {
				uni.navigateTo({
					url: '/pages/mine/change-password'
				});
			},
			back() {
				uni.navigateBack({
					delta: 1
				});
			},
			loginOut(){
				logout().then(res=>{
					console.log("退出登录",res)
					uni.navigateTo({
						url: '/pages/login'
					});
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.uni-page-body,
	html,
	body,
	.page {
		width: 100%;
		height: 100%;
	}
	.title-bg {
		width: 100%;
		padding: 0 10px;
		height: 65px;
		background: linear-gradient(-90deg, #3C88D8 0%, #7CAFE7 100%);


		.text {
			color: #FFFFFF;
			font-size: 16px;
			font-weight: 600;
			margin-left: 10px;
		}
	}
	.item{
		width: 100%;
		margin-top: 10px;
		background-color: white;
		height: 45px;
		padding: 0 10px;
	}
	.login-out{
		margin-top: 50px;
		width: 70%;
		height: 45px;
		background: linear-gradient(-90deg, #3C88D8 0%, #7CAFE7 100%);
		text-align: center;
		line-height: 45px;
		color: white;
		border-radius: 3px;
	}
</style>